/*
 * Attack.h
 *
 *  Created on: 2011-5-5
 *      Author: Administrator
 */

#ifndef ATTACK_H_
#define ATTACK_H_

#include <FBase.h>
#include <FGraphics.h>


namespace Galaxy {

class Planet;
class Player;
class GalaxyThread;
class PlanetsMap;

class Attack : public Osp::Base::Object {
public:
	Attack(Planet* pSource, Planet* pDest);
	Attack(const Attack& attack);
	virtual ~Attack();

public:
	Attack& operator =(const Attack& attack);
private:
	int CreateShipColor(int shipColor);
	void InitShipPositon(int nbSoldier, int* ships, Planet* pSource, Planet* pDest);

public:
	bool DoPhysic(GalaxyThread* pThread, PlanetsMap* pPlanetsMap, long now);

public:
	void DoDraw(Osp::Graphics::Canvas* pCanvas);

public:
	Player* __pPlayer;

private:
	int __playerForce;
	Planet* __pDestPlanet;
	int __nbSoldier;

	int* __pShips;
	long __lastTime;
	int __speedChance;
	int __nbIteration;
};
}


#endif /* ATTACK_H_ */
